// 配置  必备参数
const appId = 'wx7b0a22d199bef75a'
// 测试
// const appkey = 'B0aOMy9JIixch1Cx'
// const appSecret = '2b82f2d4c477637187da013d1d57ee2b'
// 线上
const appkey = 'c7wcPqO41ldlibvf'
const appSecret = 'pKbqhgNdhxQRM1xGWHos8lGaG4r0HKBh'


/** 环境配置 */

/** 接口地址配置 */
let server
let test = {
  envVersion: 'trial', // develop开发版 trial体验版 release线上版
  appId,
  appkey,
  appSecret,
  shareImg: '',
  userSignature: '',
  busSignature: '',
  signature: {
    user: '123456',
    bus: 'V0j7lEImJmCQTr7xEfPUhr7yfveJeSMI',
    upload: 'lwJI6lbehhhQLZWOLbEgqcdxuGpyi4WZ',
    other: 'Q2nxjKVKN5W0djIQ21QjCl538Dwfqc0x'
  },
  base: 'http://test.fe.ptevent.cn/mini_activity',
  uas: 'http://api-uas.test.ptevent.cn',
  // userHost: 'http://api-uas.test.ptevent.cn', // 用户相关地址
  // taskHost: 'http://promote.putaoevent.com',
  userHost: 'https://api-uas.putao.com', // 用户相关地址
  taskHost: 'https://api-partner.bloks.com',
}

let online = {
  envVersion: 'release', // develop开发版 trial体验版 release线上版
  appId,
  appkey,
  appSecret,
  shareImg: '',
  userSignature: '',
  busSignature: '',
  signature: {
    user: 'V0j7lEImJmCQTr7xEfPUhr7yfveJeSMI',
    bus: 'V0j7lEImJmCQTr7xEfPUhr7yfveJeSMI',
    upload: 'lwJI6lbehhhQLZWOLbEgqcdxuGpyi4WZ',
    other: 'Q2nxjKVKN5W0djIQ21QjCl538Dwfqc0x'
  },
  base: 'https://h5.putao.com/mini_activity',
  uas: 'https://api-uas.putao.com',
  // userHost: 'http://api-uas.test.ptevent.cn', // 用户相关地址
  // taskHost: 'http://promote.putaoevent.com',
  userHost: 'https://api-uas.putao.com', // 用户相关地址
  taskHost: 'https://api-partner.bloks.com',
}

if (process.env.NODE_ENV == 'development') {
  server = test
} else {
  server = online
}

/** 请求错误码 */
const errorCodeMaps = {
  400: '请求参数有误',
  401: '当前请求需要用户验证',
  403: '请求拒绝执行',
  404: '接口不存在',
  405: '请求方法不匹配',
  406: '未满足请求头中的条件',
  408: '请求超时',
  413: '服务器拒绝处理当前请求',
  500: '服务端异常',
  501: '服务器无法识别请求',
  502: 'Bad Gateway'
}

export default {
  server,
  test,
  online,
  errorCodeMaps
}
